<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.4"/>
<title>Chameleon-Mini: C:/Dokumente und Einstellungen/skuser/Eigene Dateien/Chameleon-Mini-GitHub/Chameleon-Mini-OpenSource/Firmware/Chameleon-Mini/LUFADescriptors.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Chameleon-Mini
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.4 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_74b6a3b63f61c160c0f14b7a283a4c9b.html">Firmware</a></li><li class="navelem"><a class="el" href="dir_8465ec698d237f801ae9966d4551fcfa.html">Chameleon-Mini</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">LUFADescriptors.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><code>#include &quot;<a class="el" href="_l_u_f_a_descriptors_8h_source.html">LUFADescriptors.h</a>&quot;</code><br/>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:a4d7def6e037bf75e86c24e3adb18d705"><td class="memItemLeft" align="right" valign="top">uint16_t&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_u_f_a_descriptors_8c.html#a4d7def6e037bf75e86c24e3adb18d705">CALLBACK_USB_GetDescriptor</a> (const uint16_t wValue, const uint8_t wIndex, const void **const DescriptorAddress)</td></tr>
<tr class="separator:a4d7def6e037bf75e86c24e3adb18d705"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:addd196cc2b517282c4dc2a694313b6ac"><td class="memItemLeft" align="right" valign="top">const USB_Descriptor_Device_t <br class="typebreak"/>
PROGMEM&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_u_f_a_descriptors_8c.html#addd196cc2b517282c4dc2a694313b6ac">DeviceDescriptor</a></td></tr>
<tr class="separator:addd196cc2b517282c4dc2a694313b6ac"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a59d882a5961a04a054fab63be98c3b80"><td class="memItemLeft" align="right" valign="top">const <br class="typebreak"/>
<a class="el" href="struct_u_s_b___descriptor___configuration__t.html">USB_Descriptor_Configuration_t</a> <br class="typebreak"/>
PROGMEM&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_u_f_a_descriptors_8c.html#a59d882a5961a04a054fab63be98c3b80">ConfigurationDescriptor</a></td></tr>
<tr class="separator:a59d882a5961a04a054fab63be98c3b80"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2706320165dd3831bf525233371d7af9"><td class="memItemLeft" align="right" valign="top">const USB_Descriptor_String_t <br class="typebreak"/>
PROGMEM&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_u_f_a_descriptors_8c.html#a2706320165dd3831bf525233371d7af9">LanguageString</a></td></tr>
<tr class="separator:a2706320165dd3831bf525233371d7af9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a84557c5ab5d188d8d7cfdbfe6de20f02"><td class="memItemLeft" align="right" valign="top">const USB_Descriptor_String_t <br class="typebreak"/>
PROGMEM&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_u_f_a_descriptors_8c.html#a84557c5ab5d188d8d7cfdbfe6de20f02">ManufacturerString</a></td></tr>
<tr class="separator:a84557c5ab5d188d8d7cfdbfe6de20f02"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad68575f70b5d6ab576068eec9d59fafb"><td class="memItemLeft" align="right" valign="top">const USB_Descriptor_String_t <br class="typebreak"/>
PROGMEM&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_l_u_f_a_descriptors_8c.html#ad68575f70b5d6ab576068eec9d59fafb">ProductString</a></td></tr>
<tr class="separator:ad68575f70b5d6ab576068eec9d59fafb"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>USB Device Descriptors, for library use when in USB device mode. Descriptors are special computer-readable structures which the host requests upon device enumeration, to determine the device's capabilities and functions. </p>
</div><h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a4d7def6e037bf75e86c24e3adb18d705"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">uint16_t CALLBACK_USB_GetDescriptor </td>
          <td>(</td>
          <td class="paramtype">const uint16_t&#160;</td>
          <td class="paramname"><em>wValue</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const uint8_t&#160;</td>
          <td class="paramname"><em>wIndex</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const void **const&#160;</td>
          <td class="paramname"><em>DescriptorAddress</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">
<p>This function is called by the library when in device mode, and must be overridden (see library "USB Descriptors" documentation) by the application code so that the address and size of a requested descriptor can be given to the USB library. When the device receives a Get Descriptor request on the control endpoint, this function is called so that the descriptor details can be passed back and the appropriate descriptor sent back to the USB host. </p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a59d882a5961a04a054fab63be98c3b80"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const <a class="el" href="struct_u_s_b___descriptor___configuration__t.html">USB_Descriptor_Configuration_t</a> PROGMEM ConfigurationDescriptor</td>
        </tr>
      </table>
</div><div class="memdoc">
<p>Configuration descriptor structure. This descriptor, located in FLASH memory, describes the usage of the device in one of its supported configurations, including information about any device interfaces and endpoints. The descriptor is read out by the USB host during the enumeration process when selecting a configuration so that the host may correctly communicate with the USB device. </p>

</div>
</div>
<a class="anchor" id="addd196cc2b517282c4dc2a694313b6ac"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const USB_Descriptor_Device_t PROGMEM DeviceDescriptor</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">{</div>
<div class="line">    .Header                 = {.Size = <span class="keyword">sizeof</span>(USB_Descriptor_Device_t), .Type = DTYPE_Device},</div>
<div class="line"></div>
<div class="line">    .USBSpecification       = VERSION_BCD(01.10),</div>
<div class="line">    .Class                  = CDC_CSCP_CDCClass,</div>
<div class="line">    .SubClass               = CDC_CSCP_NoSpecificSubclass,</div>
<div class="line">    .Protocol               = CDC_CSCP_NoSpecificProtocol,</div>
<div class="line"></div>
<div class="line">    .Endpoint0Size          = FIXED_CONTROL_ENDPOINT_SIZE,</div>
<div class="line"></div>
<div class="line">    .VendorID               = 0x03EB,</div>
<div class="line">    .ProductID              = 0x2044,</div>
<div class="line">    .ReleaseNumber          = VERSION_BCD(00.01),</div>
<div class="line"></div>
<div class="line">    .ManufacturerStrIndex   = 0x01,</div>
<div class="line">    .ProductStrIndex        = 0x02,</div>
<div class="line">    .SerialNumStrIndex      = USE_INTERNAL_SERIAL,</div>
<div class="line"></div>
<div class="line">    .NumberOfConfigurations = FIXED_NUM_CONFIGURATIONS</div>
<div class="line">}</div>
</div><!-- fragment --><p>Device descriptor structure. This descriptor, located in FLASH memory, describes the overall device characteristics, including the supported USB version, control endpoint size and the number of device configurations. The descriptor is read out by the USB host when the enumeration process begins. </p>

</div>
</div>
<a class="anchor" id="a2706320165dd3831bf525233371d7af9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const USB_Descriptor_String_t PROGMEM LanguageString</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">{</div>
<div class="line">    .Header                 = {.Size = USB_STRING_LEN(1), .Type = DTYPE_String},</div>
<div class="line"></div>
<div class="line">    .UnicodeString          = {LANGUAGE_ID_ENG}</div>
<div class="line">}</div>
</div><!-- fragment --><p>Language descriptor structure. This descriptor, located in FLASH memory, is returned when the host requests the string descriptor with index 0 (the first index). It is actually an array of 16-bit integers, which indicate via the language ID table available at USB.org what languages the device supports for its string descriptors. </p>

</div>
</div>
<a class="anchor" id="a84557c5ab5d188d8d7cfdbfe6de20f02"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const USB_Descriptor_String_t PROGMEM ManufacturerString</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">{</div>
<div class="line">    .Header                 = {.Size = USB_STRING_LEN(11), .Type = DTYPE_String},</div>
<div class="line"></div>
<div class="line">    .UnicodeString          = L<span class="stringliteral">&quot;Dean Camera&quot;</span></div>
<div class="line">}</div>
</div><!-- fragment --><p>Manufacturer descriptor string. This is a Unicode string containing the manufacturer's details in human readable form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device Descriptor. </p>

</div>
</div>
<a class="anchor" id="ad68575f70b5d6ab576068eec9d59fafb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const USB_Descriptor_String_t PROGMEM ProductString</td>
        </tr>
      </table>
</div><div class="memdoc">
<b>Initial value:</b><div class="fragment"><div class="line">=</div>
<div class="line">{</div>
<div class="line">    .Header                 = {.Size = USB_STRING_LEN(13), .Type = DTYPE_String},</div>
<div class="line"></div>
<div class="line">    .UnicodeString          = L<span class="stringliteral">&quot;LUFA CDC Demo&quot;</span></div>
<div class="line">}</div>
</div><!-- fragment --><p>Product descriptor string. This is a Unicode string containing the product's details in human readable form, and is read out upon request by the host when the appropriate string ID is requested, listed in the Device Descriptor. </p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Thu Jan 2 2014 10:08:12 for Chameleon-Mini by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.4
</small></address>
</body>
</html>
